import {useState, useEffect} from "react";

function useSetTableScroll() {
  const [tableHeight, setTableHeight] = useState(0)

  useEffect(() => {
    const wrapHeight = document.querySelector('.marvel_table_container').clientHeight;
    const topHeight = document.querySelector('.top_search').clientHeight
    setTableHeight(wrapHeight - topHeight - 72 - 64 - 100)
  }, []);
  return tableHeight;
}

export default useSetTableScroll
